package com.ruoyi.Apps.Phone;

import com.ruoyi.Apps.Utils.PhoneUtil;
import com.ruoyi.common.xss.Xss;
import javax.validation.ConstraintValidator;
import javax.validation.ConstraintValidatorContext;

/**
 * 自定义xss校验注解实现
 * 
 * @author ruoyi
 */
public class PhoneValidator implements ConstraintValidator<Xss, String>
{
    @Override
    public boolean isValid(String value, ConstraintValidatorContext constraintValidatorContext)
    {
        return PhoneUtil.isMobile(value);
    }
}